
#include "VinH264Decoder.h"
#include "VinH264NalUnit.h"



static VinH264Decoder* CreateDecoder ()
{
    // Create the instance of the decoder and return the instance.
    VinH264Decoder* theDecoder = new VinH264Decoder();
    return theDecoder;
}
    
void ReleaseDecoder (VinH264Decoder* decoder)
{
    if ( decoder != NULL ) {
        delete decoder;
        decoder = NULL;
    }
}


VinH264Decoder::VinH264Decoder ()
{
}

VinH264Decoder::~VinH264Decoder ()
{
}

UInt32 VinH264Decoder::InitVinH264Decoder (UInt32 inBufferSize)
{
    UInt32 result = kDecoderNoError;
    return result;
}

UInt32 VinH264Decoder::Decode (UInt8* bitstream)
{
    UInt32 result = kDecoderNoError;

    VinNalUnit* nalUnitObj = new VinNalUnit();

    nalUnit* nalUnitData = nalUnitObj->GetNextNalUnit(bitstream);

    nalUnitObj->ParseNalUnit(nalUnitData);

    return result;
}